from rest_framework_mongoengine import serializers
from .models import CiType, Ci


class CiTypeSerializer(serializers.DocumentSerializer):
    class Meta:
        model = CiType
        # fields = '__all__' # fields
        exclude = ['fields']

class CiTypeWithFieldsSerializer(serializers.DocumentSerializer):
    class Meta:
        model = CiType # Document
        fields = '__all__' # fields

class CiSerializer(serializers.DynamicDocumentSerializer):
    class Meta:
        model = Ci
        fields = '__all__'

